<?php

class IndexController extends AuthController {
	public $DB;
	public function __Init(){
		$this->DB = new IndexModel;
	}
	public function index(){
		$this->assign('time',date('Y-m-d H:i:s',time()));
		$this->display('index.html');
	}

	public function main(){
		// 服务器ip
		$this->assign('serverip',$_SERVER['SERVER_ADDR']);
		// 服务器环境
		$this->assign('servers',$_SERVER['SERVER_SOFTWARE']);
		// 获取数据库版本信息
		$this->assign('sqlServer',mysql_get_server_info());
		// 获取管理员相关的信息
		$field = $this->DB->getInfo();
		// 分配管理员信息
		$this->assign('field',$field[0]);
		$this->display('main.html');
	}
}


?>